package day7.Exer;


public class Pet {
    protected String name;
    private double weight;
    private String vari;
    public Pet(){
    }

    public Pet(String name, double weight,String vari) {
        this.name = name;
        this.weight =weight;
        this.vari = vari;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getVari() {
        return vari;
    }

    public void setVari(String vari) {
        this.vari = vari;
    }
    public void introduct(){
        System.out.println("这只宠物名字叫"+getName());
        System.out.println("体重是"+getWeight()+"Kg.品种是"+getVari());
    }
    public void eat(){
        System.out.println(getName()+"饿了，在吃东西！");
    }
    public void slepp(){
        System.out.println(getName()+"困了，在睡觉！");
    }
}
